package com.hzcx.app.simplechat.ui.publicui.bean;

import com.hzcx.app.simplechat.ui.group.bean.GroupInfoBean;
import com.hzcx.app.simplechat.util.UserInfoUtil;

import org.litepal.annotation.Column;
import org.litepal.crud.LitePalSupport;

import java.io.Serializable;

public class HxUserInfoBean extends LitePalSupport implements Serializable {


    /**
     * member_id : 2
     * nickname : ll
     * avatar : http://osscqhzcx.oss-accelerate.aliyuncs.com/FLadmin/20201126/645178e70e02fc002fc4d49c4f150c2e.jpg
     * remarks_name : 123
     * by_remarks_name : jyy
     */

    // 多聊体系会员ID
    private int member_id;
    private String nickname;
    private String avatar;
    private String remarks_name;
    private String by_remarks_name;
    // 当前用户的ID
    private int myUserId;
    // 环信体系UID
    private String hxusername;
    private int is_assistant;
    private int is_service;

    public int getIs_service() {
        return is_service;
    }

    public void setIs_service(int is_service) {
        this.is_service = is_service;
    }

    public int getIs_assistant() {
        return is_assistant;
    }

    public void setIs_assistant(int is_assistant) {
        this.is_assistant = is_assistant;
    }

    public int getMyUserId() {
        return myUserId;
    }

    public void setMyUserId(int myUserId) {
        this.myUserId = myUserId;
    }

    public String getHxusername() {
        return hxusername;
    }

    public void setHxusername(String hxusername) {
        this.hxusername = hxusername;
    }

    public int getMember_id() {
        return member_id;
    }

    public void setMember_id(int member_id) {
        this.member_id = member_id;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getRemarks_name() {
        return remarks_name;
    }

    public void setRemarks_name(String remarks_name) {
        this.remarks_name = remarks_name;
    }

    public String getBy_remarks_name() {
        return by_remarks_name;
    }

    public void setBy_remarks_name(String by_remarks_name) {
        this.by_remarks_name = by_remarks_name;
    }

    public static HxUserInfoBean HxUserInfoBean(GroupInfoBean groupInfoBean) {
        HxUserInfoBean bean = new HxUserInfoBean();
        bean.setMember_id(groupInfoBean.getMember_id());
        bean.setNickname(groupInfoBean.getGroup_name());
        bean.setAvatar(groupInfoBean.getGroup_image());
        bean.setRemarks_name("");
        bean.setBy_remarks_name("");
        bean.setMyUserId(UserInfoUtil.getUserId());
        bean.setHxusername(groupInfoBean.getHx_groupid());
        bean.setMember_id(Integer.valueOf(groupInfoBean.getGroup_id()));
        bean.setIs_assistant(0);
        bean.setIs_service(0);
        return bean;
    }

}
